package com.example.demo.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.example.demo.vo.MoneyVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * @author Shanks
 * @date 2020-10-30
 */
@Slf4j
@Api(value = "MoneyController", tags = {"金额"})
@RestController
public class MoneyController {

    @GetMapping("/money")
    @ApiOperation(value = "金额", notes = "金额")
    public R<MoneyVO> money() {
        MoneyVO vo = new MoneyVO();
        vo.setM1(28475647);
        vo.setM2(2234567.09D);
        vo.setM3(1098777777777L);
        vo.setM4(new BigDecimal("12345678.876"));
        return R.ok(vo);
    }
}